API Documentation
Public Member Functions | List of all members
nkGraphics::Viewport Class Referenceabstract

Holds all the information needed about a viewport. More...

Public Member Functions

 Viewport ()
 
virtual ~Viewport ()
 
virtual float getWidth () const =0
 
virtual float getHeight () const =0
 
virtual float getMinDepth () const =0
 
virtual float getMaxDepth () const =0
 
virtual float getTopLeftX () const =0
 
virtual float getTopLeftY () const =0
 
virtual nkMemory::StringView getName () const
 
virtual bool getDirtyViewport () const
 
virtual void setWidth (float width)=0
 
virtual void setHeight (float height)=0
 
virtual void setMinDepth (float value)=0
 
virtual void setMaxDepth (float value)=0
 
virtual void setTopLeftX (float value)=0
 
virtual void setTopLeftY (float value)=0
 
virtual void setName (const nkMemory::StringView &name)
 
virtual void setDirtyViewport (bool value)
 

Detailed Description

Holds all the information needed about a viewport.

Constructor & Destructor Documentation

◆ Viewport()

nkGraphics::Viewport::Viewport ( )

Constructor. In theory, should not be called by external code. See ViewportManager::createOrRetrieve().

◆ ~Viewport()

virtual nkGraphics::Viewport::~Viewport ( )
virtual

Destructor.

Member Function Documentation

◆ getWidth()

virtual float nkGraphics::Viewport::getWidth ( ) const
pure virtual
Returns
The width of the viewport.

◆ getHeight()

virtual float nkGraphics::Viewport::getHeight ( ) const
pure virtual
Returns
The height of the viewport.

◆ getMinDepth()

virtual float nkGraphics::Viewport::getMinDepth ( ) const
pure virtual
Returns
The min depth of the viewport.

◆ getMaxDepth()

virtual float nkGraphics::Viewport::getMaxDepth ( ) const
pure virtual
Returns
The max depth of the viewport.

◆ getTopLeftX()

virtual float nkGraphics::Viewport::getTopLeftX ( ) const
pure virtual
Returns
The top left x of the viewport.

◆ getTopLeftY()

virtual float nkGraphics::Viewport::getTopLeftY ( ) const
pure virtual
Returns
The top left y of the viewport.

◆ getName()

virtual nkMemory::StringView nkGraphics::Viewport::getName ( ) const
virtual
Returns
The name of the viewport.

◆ getDirtyViewport()

virtual bool nkGraphics::Viewport::getDirtyViewport ( ) const
virtual
Returns
Whether the viewport is dirty (true) or not (false).

◆ setWidth()

virtual void nkGraphics::Viewport::setWidth ( float  width)
pure virtual

Sets the width wanted for the viewport.

Parameters
widthThe width wanted, in pixels.

◆ setHeight()

virtual void nkGraphics::Viewport::setHeight ( float  height)
pure virtual

Sets the height wanted for the viewport.

Parameters
heightThe height wanted, in pixels.

◆ setMinDepth()

virtual void nkGraphics::Viewport::setMinDepth ( float  value)
pure virtual

Sets the min depth for the viewport.

Parameters
valueThe min depth the viewport should hold, between [0, 1].

◆ setMaxDepth()

virtual void nkGraphics::Viewport::setMaxDepth ( float  value)
pure virtual

Sets the max depth for the viewport.

Parameters
valueThe max depth the viewport should hold, between [0, 1].

◆ setTopLeftX()

virtual void nkGraphics::Viewport::setTopLeftX ( float  value)
pure virtual

Sets the top left x of the viewport.

Parameters
valueThe top left x of the viewport, in pixels.

◆ setTopLeftY()

virtual void nkGraphics::Viewport::setTopLeftY ( float  value)
pure virtual

Sets the top left y of the viewport.

Parameters
valueThe top left y of the viewport, in pixels.

◆ setName()

virtual void nkGraphics::Viewport::setName ( const nkMemory::StringView name)
virtual

Sets the name of the viewport.

Parameters
nameThe name to attach.

◆ setDirtyViewport()

virtual void nkGraphics::Viewport::setDirtyViewport ( bool  value)
virtual

Sets whether the viewport has to be considered dirty and needs an update.

Parameters
valueIf an update is needed (true) or not (false).

The documentation for this class was generated from the following file: